<template>
	<div class="vue_app AdPop" style="position: absolute;width: 100%">
		<!--头部-->
		<my-header :title="'广告弹框链接'" :hasTitle="true" :hasBack="true">
			<Share :url="shareUrl"></Share>
		</my-header>
		<!--内容-->
		<div class="aui-content overhidAbout" style="flex:1;overflow-y:auto;">
			<div class="concent">
             <img src="../../../download/img/bg1.jpg" />
			</div>
		</div>

	</div>
</template>

<script>
	import MyHeader from "../header";
	import axios from "axios";
	import ButtonToTop from '../../real-components/ButtonToTopForTest';
	import Share from "../../real-components/Share";
	export default {
		data() {
			return {
                imgsrc:""
			}
		},
		components: {
			"my-header": MyHeader,
			ButtonToTop,
			Share,
		},
		computed: {
			shareUrl() {
				return `${location.href}&share=1`
			}
		},
		methods: {
			//回到顶部
			goTop() {
				this.$refs.verticalScroll.goTop()
			},
			//判断是否登录
			mysessionId() {
				var sessionId = localStorage.getItem('sessionId');
				if(!sessionId || sessionId == 'undefined') {
					MessageBox('用户未登录账号', '请先登录账号再查看活动').then(
						() => {
							this.$router.push({
								path: 'login',
								query: {
									page: 'AdPop',
									Page: 1
								}
							})
						}
					)
					return
				} else {
					this.$router.push({
						path: 'code',
						query: {
							page: 'AdPop',
							Page: 1
						}
					})
				}

			},
			//获取数据请求
			getAboutdata() {
				//				http://test.vmbase.scn.weilian.cn/expMana/queryExplain?storeCode=0&typeCode=EXP_US&length=1   
				//				window.api.storeCode
				let config = {
					url: window.api.base_host + '/expMana/queryExplain',
					method: 'GET',
					params: {
						storeCode: window.api.storeCode,
						typeCode: "EXP_US",
						length: 1
					},
				};
				axios(config).then((res) => {
					console.log(res.data.data);
					if(res.data.returnCode && res.data.data && res.data.data.length) {
						console.log(res.data.data[0].expCode)
						var expCode = res.data.data[0].expCode;
						let obj = {
							url: window.api.base_host + '/expMana/findDetail',
							method: 'GET',
							params: {
								expCode: expCode,
							},
						}
						axios(obj).then((res) => {
							//							console.log(res.data.data[0]);
							if(res.data.returnCode) {
								this.aboutData = res.data.data[0].detail;
								console.log(this.aboutData, '获取到的数据')
							}
						})

					}
				})
			},
		},
		mounted() {
			/*this.getAboutdata();*/
			console.log(888888)
		},
	}
</script>

<style>
	h4 {
		text-align: center;
	}
	
	.overhidAbout {
		overflow: hidden;
	}
	
	/*.AdPop .concent {
		padding: 0rem 0.5rem;
		text-align: left;
	}*/
	.AdPop .concent img{
		width: 100%;
		height: 100%;
	}
	.AdPop {
		width: 100%;
		height: 100%;
		display: flex;
		flex-direction: column;
		justify-content: space-between;
	}
</style>